Public Class TDSMDataListUIModel

    Private Sub TDSMDataListUIModel_HostModelChanged(sender As Object, e As AppFx.UIModeling.Core.HostModelChangedEventArgs) Handles Me.HostModelChanged
        SetDateVisibilities()
    End Sub

    Private Sub TDSMDataListUIModel_Loaded(ByVal sender As Object, ByVal e As Blackbaud.AppFx.UIModeling.Core.LoadedEventArgs) Handles Me.Loaded
        SetDateVisibilities()
    End Sub

    Private Sub TDSMDataListUIModel_PropertyChanging(sender As Object, e As System.ComponentModel.PropertyChangingEventArgs) Handles Me.PropertyChanging
        SetDateVisibilities()
    End Sub

    Private Sub TDSMDataListUIModel_UIFieldChanged(sender As Object, e As AppFx.UIModeling.Core.UIFieldChangedEventArgs) Handles Me.UIFieldChanged
        SetDateVisibilities()
    End Sub

    Private Sub SetDateVisibilities()
        Dim val As String = Me.DATEFILTER.Value.ToString()
        Me.STARTDATE.Visible = (val.ToUpper = "DATERANGE")
        Me.ENDDATE.Visible = Me.STARTDATE.Visible
    End Sub

End Class